#include "physics.h"
#include "../../bullet/src/btBulletDynamicsCommon.h"

// Externally visible structures
TPHCLINK tphPhysicsWorld_t *TPH_InitPhysics()
{
	btDynamicsWorld *world;

	world = new btDiscreteDynamicsWorld();

	if(!world)
		return NULL;

	return world;
}

TPHCLINK void TPH_DestroyWorld(tphPhysicsWorld_t *world)
{
	delete world;
}

TPHCLINK void TPH_SetGravity(tphPhysicsWorld_t *world, float *vec)
{
	world->setGravity(btVector3(vec[0], vec[1], vec[2]));
}
